package com.gosuncn.config.pdf;

/**
 * 标志不同系统对应的工具名
 */
public enum SystemTool {

    WINDOWS("windows", "wkhtmltopdf.exe"), LINUX("linux", "wkhtmltopdf"), APPLE("", ""), ARM("arm", null);

    private String system;
    private String toolName;

    private SystemTool(String system, String toolName) {
        this.system = system;
        this.toolName = toolName;
    }

    public String getSystem() {
        return system;
    }

    public String getToolName() {
        return toolName;
    }

    public static SystemTool getBySystemName(String system) {
        for (SystemTool v : SystemTool.values()) {
            if (v.getSystem().equals(system)) {
                return v;
            }
        }
        return null;
    }

}
